/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt <hewitt@netscape.com>
 *   Jason Kersey <kerz@netscape.com>
 *   Pierre Chanial <chanial@noos.fr>
 *   Dean Tessman <dean_tessman@hotmail.com>
 *   Blake Ross <blake@cs.stanford.edu>
 *   Pamela Greene <pamg.bugs@gmail.com>
 *   Dao Gottwald <dao@design-noir.de>
 *   Anders Conbere <aconbere@bytecave.net>
 *   DonGato <dongato@gmx.net>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

@import url("chrome://global/skin/");

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

#menubar-items {
  -moz-box-orient: vertical; /* for flex hack */
}

#menubar-items > menubar,
#main-menubar {
  -moz-box-flex: 1; /* make menu items expand to fill toolbar height */
}

/* ..... fix searchbar "add engine" padding issue ..... */

#searchbar {
  -moz-margin-start: 3px;
}

#searchbar .searchbar-popup .open-engine-manager {
  -moz-padding-start: 4px;
}

#searchbar[empty="true"] .searchbar-textbox {
  color: GrayText;
  direction: ltr !important;
}

#searchbar[empty="true"] html|input {
  direction: ltr !important;
  text-align: left !important;
}

#searchbar[chromedir="rtl"][empty="true"] html|input {
  direction: rtl !important;
  text-align: right !important;
}

#wrapper-search-container #searchbar html|*.textbox-input {
  visibility: hidden;
}

#navigator-toolbox:-moz-system-metric(windows-default-theme):not(:-moz-lwtheme) {
  padding-bottom: 1px; /* uxtheme border drawing fix/hack */
}

#navigator-toolbox[inFullscreen="true"],
#navigator-toolbox[inFullscreen="true"] > #nav-bar {
  border-top: none;
}

#print-preview-toolbar {
  -moz-appearance: none;
  border: none;
}

/* ::::: bookmark buttons ::::: */

toolbarbutton.bookmark-item {
  margin: 1px;
  min-width: 0px;
  max-width: 13em;
  padding: 2px;
  color: #000;
  border: 1px solid transparent;
}

toolbarbutton.bookmark-item-microsummarized {
  max-width: 20em;
}

toolbarbutton.bookmark-item:hover {
  border-color: #FFF #BBB #BBB #FFF;
}

toolbarbutton.bookmark-item:active,
toolbarbutton.bookmark-item[open="true"] {
  border-color: #BBB #FFF #FFF #BBB;
}

.bookmark-item > .toolbarbutton-icon {
  width: 16px;
  height: 16px;
  margin-right: 3px;
}

/* Prevent [mode="icons"] from hiding the label */
.bookmark-item > .toolbarbutton-text {
  display: -moz-box !important;
}

.bookmark-item > .toolbarbutton-menu-dropmarker {
  display: none;
}

#wrapper-personal-bookmarks[place="palette"] > .toolbarpaletteitem-box {
  width: 16px;
  height: 16px;
  background: url("chrome://browser/skin/bookmarks-folder.png") no-repeat;
}

.bookmarks-toolbar-customize {
  display: none;
  max-width: 15em !important;
  border: none !important;
  -moz-appearance: none !important;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-customize {
  display: -moz-box;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-overflow-items {
  visibility: hidden;
}

toolbarpaletteitem[place="toolbar"] .bookmarks-toolbar-items {
  visibility: hidden;
}

toolbarpaletteitem[place="toolbar"] .places-toolbar-items {
  display: none;
}

/* ::::: bookmark menus ::::: */

menu.bookmark-item,
menuitem.bookmark-item {
  min-width: 0px;
  max-width: 26em;
  padding: 0px 3px 0px 2px;
}

.bookmark-item > .menu-iconic-left {
  margin-top: 0px;
  margin-bottom: 0px;
}

.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
  width: 16px;
  height: 16px;
  -moz-padding-start: 0px;
}

/* ..... fix bookmarks padding issue ..... */

#menu_BookmarksPopup menuitem,
#menu_BookmarksPopup menu {
  -moz-padding-start: 4px;
}

#menu_BookmarksPopup menuitem.menuitem-iconic,
#menu_BookmarksPopup menu.menu-iconic {
  -moz-padding-start: 4px;
}

/* ::::: bookmark items ::::: */

.bookmark-item  {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.bookmark-item[container] {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[container][open] {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.bookmark-item[container][livemark] {
  list-style-image: url("chrome://browser/skin/livemark-folder.png");
  -moz-image-region: auto;
}

.bookmark-item[container][livemark] .bookmark-item {
  list-style-image: url("chrome://browser/skin/livemark-item.png");
  -moz-image-region: auto;
}

.bookmark-item[container][query] {
  list-style-image: url("chrome://browser/skin/places/query.png");
  -moz-image-region: auto;
}

.bookmark-item[query][tagContainer] {
  list-style-image: url("chrome://browser/skin/places/tagcontainericon.png");
  -moz-image-region: auto;
}

.bookmark-item[query][dayContainer] {
  list-style-image: url("chrome://browser/skin/places/calendar.png");
  -moz-image-region: auto;
}

.bookmark-item[query][hostContainer] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[query][hostContainer][open] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

/* ::::: bookmark panel dropdown icons ::::: */

#editBMPanel_toolbarFolderItem {
  list-style-image: url("chrome://browser/skin/places/bookmarkstoolbar.png");
  -moz-image-region: auto !important;
}

#editBMPanel_bmRootItem {
  list-style-image: url("chrome://browser/skin/places/bookmarksmenu.png");
  -moz-image-region: auto !important;
}

#editBMPanel_unfiledRootItem {
  list-style-image: url("chrome://browser/skin/places/unsortedbookmarks.png");
  -moz-image-region: auto !important;
}

/* ::::: primary toolbar buttons ::::: */

/*.toolbarbutton-1 {*/
.toolbarbutton-1:not([type="menu-button"]) {
  -moz-box-orient: vertical;
  min-width: 0px;
  margin: 1px 0px;
  list-style-image: url("chrome://browser/skin/toolbar.png");
}

.toolbarbutton-1 > .toolbarbutton-icon {
  -moz-margin-end: 0px;
}

toolbar[mode="full"] .toolbarbutton-1,
toolbar[mode="full"] .toolbarbutton-menubutton-button {
  min-width: 57px;
}

.toolbarbutton-1,
.toolbarbutton-menubutton-button {
  padding: 1px;
}

toolbar[iconsize="large"][mode="icons"] .toolbarbutton-1:-moz-system-metric(windows-default-theme),
.toolbarbutton-menubutton-button:-moz-system-metric(windows-default-theme) {
  padding: 1px; /* uxtheme border drawing fix/hack */
}

toolbar[iconsize="large"][mode="icons"] .toolbarbutton-1[checked="true"]:-moz-system-metric(windows-default-theme) {
  padding: 2px !important; /* uxtheme border drawing fix/hack */
}

toolbar[mode="icons"] .toolbarbutton-text {
  display: none;
}

toolbar[mode="text"] .toolbarbutton-icon {
  display: none;
}

toolbar[mode="text"] .toolbarbutton-text {
  padding: 3px;
  margin: 0px;
}

/* ::::: 30px primary toolbar buttons ::::: */

/* back button */

#back-button {
  -moz-image-region: rect(0px 30px 30px 0px);
}
#back-button:not([disabled="true"]):hover,
#back-button[buttonover="true"] {
  -moz-image-region: rect(30px 30px 60px 0px);
}
#back-button[disabled="true"] {
  -moz-image-region: rect(60px 30px 90px 0px);
}

#back-button[chromedir="rtl"] {
  -moz-image-region: rect(0px 60px 30px 30px);
}
#back-button[chromedir="rtl"]:not([disabled="true"]):hover,
#back-button[chromedir="rtl"][buttonover="true"] {
  -moz-image-region: rect(30px 60px 60px 30px);
}
#back-button[chromedir="rtl"][disabled="true"] {
  -moz-image-region: rect(60px 60px 90px 30px);
}

/* forward button */

#forward-button {
  -moz-image-region: rect(0px 60px 30px 30px);
}
#forward-button:not([disabled="true"]):hover,
#forward-button[buttonover="true"] {
  -moz-image-region: rect(30px 60px 60px 30px);
}
#forward-button[disabled="true"] {
  -moz-image-region: rect(60px 60px 90px 30px);
}

#forward-button[chromedir="rtl"] {
  -moz-image-region: rect(0px 30px 30px 0px);
}
#forward-button[chromedir="rtl"]:not([disabled="true"]):hover,
#forward-button[chromedir="rtl"][buttonover="true"] {
  -moz-image-region: rect(30px 30px 60px 0px);
}
#forward-button[chromedir="rtl"][disabled="true"] {
  -moz-image-region: rect(60px 30px 90px 0px);
}

/* stop button */

#stop-button {
  -moz-image-region: rect(0px 90px 30px 60px);
}
#stop-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 90px 60px 60px);
}
#stop-button[disabled="true"] {
  -moz-image-region: rect(60px 90px 90px 60px);
}

/* reload button */

#reload-button {
  -moz-image-region: rect(0px 120px 30px 90px);
}
#reload-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 120px 60px 90px);
}
#reload-button[disabled="true"] {
  -moz-image-region: rect(60px 120px 90px 90px);
}

/* home button */

#home-button {
  -moz-image-region: rect(0px 150px 30px 120px);
}
#home-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 150px 60px 120px);
}
#home-button[disabled="true"] {
  -moz-image-region: rect(60px 150px 90px 120px);
}

/* download manager button */

#downloads-button {
  -moz-image-region: rect(0px 180px 30px 150px);
}
#downloads-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 180px 60px 150px);
}
#downloads-button[disabled="true"] {
  -moz-image-region: rect(60px 180px 90px 150px);
}

/* history sidebar button */

#history-button {
  -moz-image-region: rect(0px 210px 30px 180px);
}
#history-button:not([disabled="true"]):not([checked="true"]):hover,
#history-button[checked="true"] {
  -moz-image-region: rect(30px 210px 60px 180px);
}
#history-button[disabled="true"] {
  -moz-image-region: rect(60px 210px 90px 180px);
}

/* bookmark sidebar button */

#bookmarks-button {
  -moz-image-region: rect(0px 240px 30px 210px);
}
#bookmarks-button:not([disabled="true"]):not([checked="true"]):hover,
#bookmarks-button[checked="true"] {
  -moz-image-region: rect(30px 240px 60px 210px);
}
#bookmarks-button[disabled="true"] {
  -moz-image-region: rect(60px 240px 90px 210px);
}

#bookmarks-menu-button,
#bookmarks-button {
  -moz-image-region: rect(0px 240px 30px 210px);
}
#bookmarks-menu-button:not([disabled="true"]):not([checked="true"]):hover,
#bookmarks-menu-button[checked="true"],
#bookmarks-button:not([disabled="true"]):not([checked="true"]):hover,
#bookmarks-button[checked="true"] {
  -moz-image-region: rect(30px 240px 60px 210px);
}
#bookmarks-menu-button[disabled="true"], 
#bookmarks-button[disabled="true"] {
  -moz-image-region: rect(60px 240px 90px 210px);
}

#bookmarks-menu-button.toolbarbutton-1 {
  -moz-box-orient: horizontal;
}

/* print button */

#print-button {
  -moz-image-region: rect(0px 270px 30px 240px);
}
#print-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 270px 60px 240px);
}
#print-button[disabled="true"] {
  -moz-image-region: rect(60px 270px 90px 240px);
}

/* new tab button */

toolbar:not([iconsize="small"]) #new-tab-button > .toolbarbutton-icon {
  padding-left: 1px;
}
#new-tab-button {
  -moz-image-region: rect(0px 300px 30px 270px);
}
#new-tab-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 300px 60px 270px);
}
#new-tab-button[disabled="true"] {
  -moz-image-region: rect(60px 300px 90px 270px);
}

/* new window button */

toolbar:not([iconsize="small"]) #new-window-button > .toolbarbutton-icon {
  padding-left: 1px;
}
#new-window-button {
  -moz-image-region: rect(0px 330px 30px 300px);
}
#new-window-button:not([disabled="true"]):hover {
  -moz-image-region: rect(30px 330px 60px 300px);
}
#new-window-button[disabled="true"] {
  -moz-image-region: rect(60px 330px 90px 300px);
}

/* cut button */

#cut-button {
  -moz-image-region: rect(0px 360px 30px 330px);
}
#cut-button:not([disabled="true"]):hover,
#cut-button[checked="true"] {
  -moz-image-region: rect(30px 360px 60px 330px);
}
#cut-button[disabled="true"] {
  -moz-image-region: rect(60px 360px 90px 330px);
}

/* copy button */

#copy-button {
  -moz-image-region: rect(0px 390px 30px 360px);
}
#copy-button:not([disabled="true"]):hover,
#copy-button[checked="true"] {
  -moz-image-region: rect(30px 390px 60px 360px);
}
#copy-button[disabled="true"] {
  -moz-image-region: rect(60px 390px 90px 360px);
}

/* paste button */

#paste-button {
  -moz-image-region: rect(0px 420px 30px 390px);
}
#paste-button:not([disabled="true"]):hover,
#paste-button[checked="true"] {
  -moz-image-region: rect(30px 420px 60px 390px);
}
#paste-button[disabled="true"] {
  -moz-image-region: rect(60px 420px 90px 390px);
}

/* fullscreen button */

#fullscreen-button {
  -moz-image-region: rect(0px 480px 30px 450px);
}
#fullscreen-button:not([disabled="true"]):hover,
#fullscreen-button[checked="true"] {
  -moz-image-region: rect(30px 480px 60px 450px);
}
#fullscreen-button[disabled="true"] {
  -moz-image-region: rect(60px 480px 90px 450px);
}
/* I AM DISSAPOINT: sync-button / zoom-out-button / zoom-in-button tabview-button */
/* FUUUU */

#zoom-out-button {
  list-style-image: url("chrome://browser/skin/4x/toolbar.png");
  -moz-image-region: rect(0, 288px, 18px, 270px);
}
 
#zoom-in-button {
  list-style-image: url("chrome://browser/skin/4x/toolbar.png");
  -moz-image-region: rect(0, 306px, 18px, 288px);
}
#sync-button {
  list-style-image: url("chrome://browser/skin/4x/toolbar.png");
  -moz-image-region: rect(0, 324px, 18px, 306px);
}

#sync-button[status="active"] {
  list-style-image: url("chrome://browser/skin/4x/sync-throbber.png");
  -moz-image-region: rect(0, 18px, 18px, 0);
}
#tabview-button {
  list-style-image: url(chrome://browser/skin/4x/tabview/tabview.png);
  -moz-image-region: rect(0, 90px, 18px, 72px);
}

#tabview-button[groups="0"] {
  -moz-image-region: rect(0, 18px, 18px, 0);
}

#tabview-button[groups="1"] {
  -moz-image-region: rect(0, 36px, 18px, 18px);
}

#tabview-button[groups="2"] {
  -moz-image-region: rect(0, 54px, 18px, 36px);
}

#tabview-button[groups="3"] {
  -moz-image-region: rect(0, 72px, 18px, 54px);
}

#addon-bar {
  min-height: 20px;
}
 
#addon-bar:not(:-moz-lwtheme) {
  -moz-appearance: statusbar;
}

#status-bar {
  -moz-appearance: none;  
  background-color: white;
/*transparent;*/
  border: none;
  min-height: 0;
}

#status-bar > statusbarpanel {
  border-width: 0;
  -moz-appearance: none;
}


#addonbar-closebutton {
/*  -moz-appearance: none;
  -moz-image-region: rect(0px, 64px, 16px, 48px);
  -moz-margin-end: 2px;  
  border: none;
  padding: 0px !important;
  list-style-image: url("chrome://global/skin/icons/close.png");
*/
/*
  border: none;
  padding: 0 5px;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-appearance: none;
  -moz-image-region: rect(0, 16px, 16px, 0);
*/

  -moz-appearance: none;
  margin: 1px 2px 1px 1px;
  min-width: 0px;
  background-color: transparent;
  border: none;
  padding: 0px !important;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0px 16px 16px 0px);
  cursor: default;

}
#addonbar-closebutton:hover {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

#addonbar-closebutton:hover:active {
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}

/* FUUUU */
/* ::::: 20px primary toolbar buttons ::::: */

toolbar[iconsize="small"] .toolbarbutton-1 {
  -moz-box-orient: vertical;
  min-width: 0px;
  list-style-image: url("chrome://browser/skin/toolbar-small.png");
}

toolbar[iconsize="small"] .toolbarbutton-1[type="menu-button"] {
  border: 0px !important;
}
/* back button */

toolbar[iconsize="small"] #back-button {
  -moz-image-region: rect(0px 20px 20px 0px);
}
toolbar[iconsize="small"] #back-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #back-button[buttonover="true"] {
  -moz-image-region: rect(20px 20px 40px 0px);
}
toolbar[iconsize="small"] #back-button[disabled="true"] {
  -moz-image-region: rect(40px 20px 60px 0px);
}

toolbar[iconsize="small"] #back-button[chromedir="rtl"] {
  -moz-image-region: rect(0px 40px 20px 20px);
}
toolbar[iconsize="small"] #back-button[chromedir="rtl"]:not([disabled="true"]):hover,
toolbar[iconsize="small"] #back-button[chromedir="rtl"][buttonover="true"] {
  -moz-image-region: rect(20px 40px 40px 20px);
}
toolbar[iconsize="small"] #back-button[chromedir="rtl"][disabled="true"] {
  -moz-image-region: rect(40px 40px 60px 20px);
}

/* forward button */

toolbar[iconsize="small"] #forward-button {
  -moz-image-region: rect(0px 40px 20px 20px);
}
toolbar[iconsize="small"] #forward-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #forward-button[buttonover="true"] {
  -moz-image-region: rect(20px 40px 40px 20px);
}
toolbar[iconsize="small"] #forward-button[disabled="true"] {
  -moz-image-region: rect(40px 40px 60px 20px);
}

toolbar[iconsize="small"] #forward-button[chromedir="rtl"] {
  -moz-image-region: rect(0px 20px 20px 0px);
}
toolbar[iconsize="small"] #forward-button[chromedir="rtl"]:not([disabled="true"]):hover,
toolbar[iconsize="small"] #forward-button[chromedir="rtl"][buttonover="true"] {
  -moz-image-region: rect(20px 20px 40px 0px);
}
toolbar[iconsize="small"] #forward-button[chromedir="rtl"][disabled="true"] {
  -moz-image-region: rect(40px 20px 60px 0px);
}

/* stop button */

toolbar[iconsize="small"] #stop-button {
  -moz-image-region: rect(0px 60px 20px 40px);
}
toolbar[iconsize="small"] #stop-button:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 60px 40px 40px);
}
toolbar[iconsize="small"] #stop-button[disabled="true"] {
  -moz-image-region: rect(40px 60px 60px 40px);
}

/* reload button */

toolbar[iconsize="small"] #reload-button {
  -moz-image-region: rect(0px 80px 20px 60px);
}
toolbar[iconsize="small"] #reload-button:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 80px 40px 60px);
}
toolbar[iconsize="small"] #reload-button[disabled="true"] {
  -moz-image-region: rect(40px 80px 60px 60px);
}

/* home button */

#home-button.bookmark-item {
  list-style-image: url("chrome://browser/skin/toolbar-small.png");
}
toolbar[iconsize="small"] #home-button ,
#home-button.bookmark-item {
  -moz-image-region: rect(0px 100px 20px 80px);
}
toolbar[iconsize="small"] #home-button:not([disabled="true"]):hover ,
#home-button.bookmark-item:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 100px 40px 80px);
}
toolbar[iconsize="small"] #home-button[disabled="true"] ,
#home-button.bookmark-item[disabled="true"] {
  -moz-image-region: rect(40px 100px 60px 80px);
}

/* download manager button */

toolbar[iconsize="small"] #downloads-button {
  -moz-image-region: rect(0px 120px 20px 100px);
}
toolbar[iconsize="small"] #downloads-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #downloads-button[checked="true"] {
  -moz-image-region: rect(20px 120px 40px 100px);
}
toolbar[iconsize="small"] #downloads-button[disabled="true"] {
  -moz-image-region: rect(40px 120px 60px 100px);
}

/* history sidebar button */

toolbar[iconsize="small"] #history-button {
  -moz-image-region: rect(0px 140px 20px 120px);
}
toolbar[iconsize="small"] #history-button:not([disabled="true"]):not([checked="true"]):hover,
toolbar[iconsize="small"] #history-button[checked="true"] {
  -moz-image-region: rect(20px 140px 40px 120px);
}
toolbar[iconsize="small"] #history-button[disabled="true"] {
  -moz-image-region: rect(40px 140px 60px 120px);
}

/* bookmark sidebar button */

toolbar[iconsize="small"] #bookmarks-menu-button,
toolbar[iconsize="small"] #bookmarks-button {
  -moz-image-region: rect(0px 160px 20px 140px);
}

toolbar[iconsize="small"] #bookmarks-menu-button:not([disabled="true"]):not([checked="true"]):hover,
toolbar[iconsize="small"] #bookmarks-menu-button[checked="true"],
toolbar[iconsize="small"] #bookmarks-button:not([disabled="true"]):not([checked="true"]):hover,
toolbar[iconsize="small"] #bookmarks-button[checked="true"] {
  -moz-image-region: rect(20px 160px 40px 140px);
}
toolbar[iconsize="small"] #bookmarks-menu-button[disabled="true"],
toolbar[iconsize="small"] #bookmarks-button[disabled="true"] {
  -moz-image-region: rect(40px 160px 60px 140px);
}

/* print button */

toolbar[iconsize="small"] #print-button {
  -moz-image-region: rect(0px 180px 20px 160px);
}
toolbar[iconsize="small"] #print-button:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 180px 40px 160px);
}
toolbar[iconsize="small"] #print-button[disabled="true"] {
  -moz-image-region: rect(40px 180px 60px 160px);
}

/* new tab button */

toolbar[iconsize="small"] #new-tab-button {
  -moz-image-region: rect(0px 200px 20px 180px);
}
toolbar[iconsize="small"] #new-tab-button:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 200px 40px 180px);
}
toolbar[iconsize="small"] #new-tab-button[disabled="true"] {
  -moz-image-region: rect(40px 200px 60px 180px);
}

/* new window button */

toolbar[iconsize="small"] #new-window-button {
  -moz-image-region: rect(0px 220px 20px 200px);
}
toolbar[iconsize="small"] #new-window-button:not([disabled="true"]):hover {
  -moz-image-region: rect(20px 220px 40px 200px);
}
toolbar[iconsize="small"] #new-window-button[disabled="true"] {
  -moz-image-region: rect(40px 220px 60px 200px);
}

/* cut button */

toolbar[iconsize="small"] #cut-button {
  -moz-image-region: rect(0px 240px 20px 220px);
}
toolbar[iconsize="small"] #cut-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #cut-button[checked="true"] {
  -moz-image-region: rect(20px 240px 40px 220px);
}
toolbar[iconsize="small"] #cut-button[disabled="true"] {
  -moz-image-region: rect(40px 240px 60px 220px);
}

/* copy button */

toolbar[iconsize="small"] #copy-button {
  -moz-image-region: rect(0px 260px 20px 240px);
}
toolbar[iconsize="small"] #copy-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #copy-button[checked="true"] {
  -moz-image-region: rect(20px 260px 40px 240px);
}
toolbar[iconsize="small"] #copy-button[disabled="true"] {
  -moz-image-region: rect(40px 260px 60px 240px);
}

/* paste button */

toolbar[iconsize="small"] #paste-button {
  -moz-image-region: rect(0px 280px 20px 260px);
}
toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #paste-button[checked="true"] {
  -moz-image-region: rect(20px 280px 40px 260px);
}
toolbar[iconsize="small"] #paste-button[disabled="true"] {
  -moz-image-region: rect(40px 280px 60px 260px);
}

/* fullscreen button */

toolbar[iconsize="small"] #fullscreen-button {
  -moz-image-region: rect(0px 320px 20px 300px);
}
toolbar[iconsize="small"] #fullscreen-button:not([disabled="true"]):hover,
toolbar[iconsize="small"] #fullscreen-button[checked="true"] {
  -moz-image-region: rect(20px 320px 40px 300px);
}
toolbar[iconsize="small"] #fullscreen-button[disabled="true"] {
  -moz-image-region: rect(40px 320px 60px 300px);
}

/* ::::: fullscreen window controls ::::: */

#window-controls {
  -moz-box-align: center;
  margin: 1px;
  padding: 0px 2px 0px 4px;
  border: none;
  background-color: transparent;
}

#minimize-button {
  list-style-image: url("chrome://global/skin/icons/minimize.gif");
}
#restore-button {
  list-style-image: url("chrome://global/skin/icons/restore.gif");
}
#close-button {
  list-style-image: url("chrome://global/skin/icons/close.gif");
}

/* ::::: nav-bar-inner ::::: */

#urlbar {
  margin-bottom: 2px;
  margin-top: 2px;
  -moz-margin-end: 0px;
  -moz-margin-start: 3px;
  width: 7em;
  min-width: 7em;
  min-height: 22px !important;
  -moz-appearance: none;
  border: 1px solid #666;
}

#urlbar-container {
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  -moz-margin-end: 5px;
}

#urlbar-icons {
  height: 18px;
  -moz-box-align: center;
  -moz-padding-end: 2px;
}

#urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) ,
#urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button {
  visibility: collapse;
}

#urlbar-search-splitter {
  -moz-margin-start: -4px;
  background: transparent;
  border: none;
}

#urlbar-search-splitter + #urlbar-container > #urlbar ,
#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox {
  -moz-margin-start: 0px;
}

#wrapper-urlbar-container #urlbar {
  -moz-user-input: disabled;
  cursor: -moz-grab;
}

#wrapper-urlbar-container #urlbar > .autocomplete-history-dropmarker {
  display: none;
}

/* Keep the URL bar LTR */

#urlbar .autocomplete-textbox-container {
  direction: ltr;
}

#PopupAutoComplete {
  direction: ltr !important;
}

#PopupAutoComplete[chromedir="rtl"] > tree > treerows {
  direction: rtl;
}

#PopupAutoComplete .autocomplete-treebody {
  direction: ltr;
}

#PopupAutoCompleteRichResult {
  direction: ltr !important;
}

/* ::::: page proxy icon ::::: */

#page-proxy-favicon,
#urlbar-throbber {
  width: 16px;
  height: 16px;
}

#page-proxy-stack {
  width: 24px;
  height: 20px;
  padding: 2px 4px;
  background: url("chrome://browser/skin/urlbar-favicon-glow.png") center center no-repeat;
}

#page-proxy-favicon:not([src]) {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px)
}

#page-proxy-favicon[pageproxystate="invalid"] {
  -moz-image-region: rect(32px, 16px, 48px, 0px);
}

#urlbar-throbber {
  list-style-image: url("chrome://browser/skin/places/searching_16.png");
}

statusbarpanel#statusbar-display {
  -moz-padding-start: 0px;
}

/* ::::: autocomplete ::::: */

#treecolAutoCompleteImage {
  max-width: 36px;
}

.ac-result-type-bookmark,
.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) {
  list-style-image: url("chrome://browser/skin/places/editbookmark.png");
  -moz-image-region: rect(0px 16px 16px 0px);
  width: 16px;
  height: 16px;
}

.ac-result-type-tag,
.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) {
  list-style-image: url("chrome://browser/skin/places/tagcontainericon.png");
  width: 16px;
  height: 16px;
}

.ac-comment {
  font-size: 1em;
}

.ac-extra > .ac-comment {
  font-size: inherit;
}

.ac-url-text {
  color: #999;
}

.ac-url-text:-moz-system-metric(windows-default-theme) {
  color: #999;
}

.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
  color: GrayText;
}

.ac-comment[selected="true"], .ac-url-text[selected="true"] {
  color: inherit !important;
}

.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment)
{
  color: GrayText;
  font-size: smaller;
}

.autocomplete-treebody::-moz-tree-cell(suggesthint) {
  border-top: 1px solid GrayText;
}

/* ::::: go button ::::: */

#go-button {
  padding: 0px 2px;
  list-style-image: url("chrome://browser/skin/go-arrow.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

#go-button:hover {
  -moz-image-region: rect(16px 16px 32px 0px);
}

/* star button */
#star-button {
  list-style-image: url("chrome://browser/skin/places/bookmark.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

#star-button:hover {
  -moz-image-region: rect(0px 32px 16px 16px);
}

#star-button:active {
  -moz-image-region: rect(0px 48px 16px 32px);
}

#star-button[starred="true"] {
  list-style-image: url("chrome://browser/skin/places/editbookmark.png");
}

/* bookmarking panel */
#editBookmarkPanel {
  min-width: 30em;
  background-color: #EEE;
  border: 1px solid #666;
  -moz-border-radius: 4px;
  color: #000;
  padding: 4px;
  margin: 2px;
}

#editBookmarkPanelStarIcon {
  list-style-image: url("chrome://browser/skin/places/starred48.png");
  width: 48px;
  height: 48px;
}

#editBookmarkPanelStarIcon[unstarred] {
  list-style-image: url("chrome://browser/skin/places/unstarred48.png");
}

#editBookmarkPanelTitle {
  font-size: 130%;
}

#editBookmarkPanelHeader,
#editBookmarkPanelContent {
  margin-bottom: .5em;
}

/* Implements editBookmarkPanel resizing on folderTree un-collapse. */
#editBMPanel_folderTree {
  min-width: 27em;
}

/* ::::: content area ::::: */

#sidebar {
  background-color: Window;
}

#sidebar-title {
  -moz-padding-start: 0px;
}

#status-bar {
  border-top: none;
}

#security-button {
  list-style-image: none;
  min-width: 20px;
  -moz-box-direction: reverse;
  display: none;
}

#security-button[level="high"],
#security-button[level="low"] {
  list-style-image: url("chrome://browser/skin/secure.png");
  display: -moz-box;
}

#security-button[level="broken"] {
  list-style-image: url("chrome://browser/skin/security-broken.png");
  display: -moz-box;
}

/* XXXsw prevent margins of a value-less label from shifting the image */
#security-button > label:not([value]) {
  display: none;
}

#page-report-button {
  width: 20px;
  list-style-image: url("chrome://browser/skin/Info.png");
}


/* ::::: throbber ::::: */
/* I HATE YOU, MILKMAN DAN */
.tab-throbber,
.tab-icon-image {
  width: 16px;
  height: 16px;
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
  -moz-margin-end: 3px;
}
 
.tab-throbber {
  list-style-image: url("chrome://browser/skin/tabbrowser/notloading_16.png");
}
 
.tab-throbber[progress] {
  list-style-image: url("chrome://browser/skin/tabbrowser/loading_16.png");
}
/* BIKIBIKIBIKIBIKI */

#navigator-throbber {
  -moz-appearance: none;
  -moz-user-focus: ignore;
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
  min-width: 0px;
  background-color: transparent;
  list-style-image: url("chrome://global/skin/icons/notloading_16.png");
}

#navigator-throbber[busy="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}
/* FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU */

/* the default settings for the throbber hbox is too tall for vista menus */
#navigator-throbber > hbox {
  border-top: 0px;
  border-bottom: 0px;
  padding-bottom: 1px;
  -moz-margin-end: 1px;
}

toolbar[iconsize="small"] #navigator-throbber,
toolbar[mode="text"] #navigator-throbber {
  list-style-image: url("chrome://global/skin/icons/notloading_16.png");
}
toolbar[iconsize="small"] #navigator-throbber[busy="true"],
toolbar[mode="text"] #navigator-throbber[busy="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}

/* Tabstrip */
.tabbrowser-strip {
  background-color: #DDD;
  border-bottom: 1px solid #666;
}

.tabbrowser-tabs {
  margin-top: -1px !important;
  background: #DDD url("chrome://browser/skin/border-top.png") repeat top right !important;
  padding-bottom: 2px;
}

.tabbrowser-tab .tab-icon-image {
  width: 16px;
  height: 16px;
  margin: 1px 3px 1px 3px;
  list-style-image: url("chrome://browser/skin/places/defaultfavicon.png");
}

.tabbrowser-tab[busy] > .tab-icon-image {
  list-style-image: url("chrome://global/skin/icons/loading.gif") !important;
}

.tabbrowser-tab {
  margin: 0px;
  border-style: none;
  padding: 3px 3px 3px 3px;
  border-top: 1px solid #666;
  background-color: transparent !important;
  background: #DDD url("chrome://browser/skin/border.png") no-repeat center right;
}

.tabbrowser-tab[selected="true"] {
  border: 1px solid #666;
  border-top-style: none;
  -moz-border-radius: 0px 0px 2px 2px;
  background-color: #EEE !important;
  background-image: none;
}

tab[beforeselected="true"] {
  background-image: none;
}

/* Tab DnD indicator */
.tab-drop-indicator-bar {
  height: 6px;
  margin-top: -6px;
  position: relative;
  /* set -moz-margin-start to -1/2 indicator width: */
  -moz-margin-start: -4px;
}

.tab-drop-indicator {
  height: 6px;
  width: 7px;
  position: relative;
  background: url('chrome://browser/skin/tabdragindicator.png') 50% 50% no-repeat;
}

/* Tab close button */
.tab-close-button > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
}

.tab-close-button {
  -moz-appearance: none;
  -moz-image-region: rect(0px, 64px, 16px, 48px);
  -moz-margin-end: 2px;
  border: none;
  padding: 0px !important;
  list-style-image: url("chrome://global/skin/icons/close.png");
}

.tab-close-button:hover,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.tab-close-button:active,
.tabbrowser-tab[selected="true"] > .tab-close-button:active {
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}

.tabbrowser-tab[selected="true"] > .tab-close-button {
  -moz-image-region: rect(0px, 16px, 16px, 0px);
  /* Make this button focusable so clicking on it will not focus the tab while
     it's getting closed */
  -moz-user-focus: normal;
}

.tab-close-button:focus {
  outline: none !important;
}

/* Tab scrollbox arrow */
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
  -moz-appearance: none !important;
  border: 1px solid transparent;
  margin-top: 0px;
  margin-bottom: 4px;
  padding: 0px;
  width: 26px;
  height: 11px;
  -moz-margin-start: 0px;
  -moz-margin-end: 0px;
  -moz-image-region: rect(0, 11px, 11px, 0);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover {
  -moz-image-region: rect(0, 22px, 11px, 11px);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"],
.tabbrowser-arrowscrollbox > .scrollbutton-down[disabled="true"] {
  opacity: .4;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):active,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):active {
  -moz-image-region: rect(0, 44px, 11px, 33px);
}

.tabbrowser-arrowscrollbox:not([flowing="multibar"]) > .scrollbutton-up {
  border-left-style: none;
  list-style-image: url("chrome://browser/skin/tab-arrow-start.png");
}

.tabbrowser-arrowscrollbox[flowing="multibar"] > .scrollbutton-up {
  border-left-style: none;
  list-style-image: url("chrome://browser/skin/tab-arrow-mrow-start.png");
}

.tabbrowser-arrowscrollbox:not([flowing="multibar"]) > .scrollbutton-up[chromedir="rtl"] {
  border-left-style: solid;
  border-right-style: none;
  list-style-image: url("chrome://browser/skin/tab-arrow-end.png");
}

.tabbrowser-arrowscrollbox[flowing="multibar"] > .scrollbutton-up[chromedir="rtl"] {
  border-left-style: solid;
  border-right-style: none;
  list-style-image: url("chrome://browser/skin/tab-arrow-mrow-end.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon {
  margin: 5px 0px 1px 0px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down {
  border-right-style: none;
  -moz-border-radius-topleft: 2px;
}

.tabbrowser-arrowscrollbox:not([flowing="multibar"]) > .scrollbutton-down {
  list-style-image: url("chrome://browser/skin/tab-arrow-end.png");
}

.tabbrowser-arrowscrollbox[flowing="multibar"] > .scrollbutton-down {
  list-style-image: url("chrome://browser/skin/tab-arrow-mrow-end.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"] {
  border-left-style: none;
  border-right-style: solid;
  -moz-border-radius-topleft: 0px;
  -moz-border-radius-topright: 2px;
}

.tabbrowser-arrowscrollbox:not([flowing="multibar"]) > .scrollbutton-down[chromedir="rtl"] {
  list-style-image: url("chrome://browser/skin/tab-arrow-start.png");
}

.tabbrowser-arrowscrollbox[flowing="multibar"] > .scrollbutton-down[chromedir="rtl"] {
  list-style-image: url("chrome://browser/skin/tab-arrow-mrow-start.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-down > .toolbarbutton-icon {
  margin-top: 5px;
  margin-bottom: 1px;
  -moz-margin-end: 2px;
}

/**
 * New Tab Button
 */

.tabs-newtab-button {
  list-style-image: url(chrome://global/skin/icons/newtab.png);
  -moz-image-region: rect(0, 20px, 16px, 0);
}

.tabs-newtab-button:hover,
.tabs-newtab-button:active {
  -moz-image-region: rect(0, 40px, 16px, 20px);
  border: 1px solid transparent;
  padding: 3px;
}

.tabbrowser-arrowscrollbox > .tabs-newtab-button {
  width: 31px;
  -moz-border-radius-topright: 2px;
  -moz-border-radius-topleft: 2px;
}

/**
 * All Tabs Button
 */
#alltabs-button, #alltabs-button[iconsize="small"] {

  border: none;
  padding: 0px 6px 0px 2px;
  list-style-image: url("chrome://global/skin/icons/alltabs.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}
#alltabs-button:hover {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

#alltabs-button:hover .toolbarbutton-menu-dropmarker {
  -moz-appearance: none !important;
/*
  list-style-image: url("chrome://global/skin/toolbar/arrow-dn-hov.gif");
  padding: 0px 2px 0px 2px;
*/
}
/*
.tabs-alltabs-button, .tabs-alltabs-button[iconsize="small"] {
  -moz-appearance: none !important;
  border: none;
  padding: 0px 6px 0px 2px;
  list-style-image: url("chrome://global/skin/icons/alltabs.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.tabs-alltabs-button:hover {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.tabs-alltabs-button:hover .toolbarbutton-menu-dropmarker {
  list-style-image: url("chrome://global/skin/toolbar/arrow-dn-hov.gif");
  padding: 0px 2px 0px 2px;
}

.tabs-alltabs-button > .toolbarbutton-text {
  display: none;
}

*/
.tabs-alltabs-box-animate {
  margin-top: 2px;
  margin-bottom: 4px;
  width: 18px !important;
  opacity: 0.0;
}

/* All tabs menupopup */
.alltabs-item > .menu-iconic-left {
  margin-right: 4px;
}

.alltabs-item > .menu-iconic-left > .menu-iconic-icon {
  max-height: 16px;
  max-width: 16px;
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.alltabs-item[selected="true"] {
  font-weight: bold;
}

.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon {
  list-style-image: url("chrome://global/skin/icons/loading.gif");
}

/* Tabstrip close button */
.tabs-closebutton {
  -moz-appearance: none;
  border: none;
  padding: 0px;
  margin-top: 4px;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.tabs-closebutton:hover {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.tabs-closebutton:active {
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}

.tabs-closebutton > .toolbarbutton-icon {
  border: 1px solid transparent;
  margin-right: 2px;
}

.tabs-container > .tabs-closebutton {
/*  margin: 3px 0px 3px;
  padding: 4px 2px 2px; */
  -moz-border-radius-topleft: 2px;
}

.tabs-container > .tabs-closebutton[chromedir="rtl"] {
  border-left: none;
}

#sidebar-box .tabs-closebutton {
  margin-bottom: 0px !important;
  padding: 0px 2px 0px 2px !important;
}

toolbarbutton.chevron {
  list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important;
}

toolbarbutton.chevron[chromedir="rtl"] {
  list-style-image: url("chrome://global/skin/toolbar/chevron-rtl.gif") !important;
}

toolbarbutton.chevron > .toolbarbutton-text {
  display: none; /* hide chevron label */
}

toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
  display: none;
}

toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
  display: -moz-box; /* display chevron icon in text mode */
}

toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
  display: -moz-box;
}

toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text {
   display: none;
}

#sidebar-throbber[loading="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
  -moz-margin-end: 4px;
}

/* Location bar dropmarker */
#urlbar > .autocomplete-history-dropmarker {
  -moz-appearance: none;
  padding: 0px;
  background-color: transparent;
  border: none;
  width: auto;
}

#urlbar > .autocomplete-history-dropmarker:hover ,
#urlbar > .autocomplete-history-dropmarker[open="true"] {
  background-color: #EEE;
}

#urlbar > .autocomplete-history-dropmarker > .dropmarker-icon {
  margin: 0px 5px;
}

#urlbar[chromedir="ltr"] > .autocomplete-history-dropmarker {
  -moz-border-left-colors: transparent;
}

#urlbar[chromedir="ltr"] > .autocomplete-history-dropmarker:hover ,
#urlbar[chromedir="ltr"] > .autocomplete-history-dropmarker[open="true"] {
  -moz-border-left-colors: ButtonShadow;
}

/* Feed icon */
#feed-button,
#feed-button > .button-box,
#feed-button:hover:active > .button-box {
  padding: 0px;
  margin: 0px;
  border: 0px;
  background-color: transparent;
}

#feed-button > hbox > .button-menu-dropmarker,
#feed-button > hbox > .button-text {
  display: none;
}

#feed-button {
  -moz-appearance: none; 
  min-width: 0px; 
  list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

#feed-button:hover {
  -moz-image-region: rect(0px 32px 16px 16px);
}

#feed-button[open="true"],
#feed-button:hover:active {
  -moz-image-region: rect(0px 48px 16px 32px);
}

/* ::::: About Popup Blocking dialog ::::: */
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
  visibility: collapse;
}

#checkForUpdates[loading="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}

/* Personal toolbar */
.toolbar-drop-indicator {
  width: 9px;
  height: 18px;
  margin-bottom: -6px;
  position: relative;
  background: url("chrome://browser/skin/places/toolbardropmarker.png") 50% 50% no-repeat;
}

.toolbar-drop-indicator-bar {
  visibility: hidden;
  height: 18px;
  margin-bottom: -18px;
  position: relative;
}

.toolbar-drop-indicator-bar[dragging="true"] {
  visibility: visible;
}

toolbarbutton.bookmark-item[dragover="true"][open="true"] {
  -moz-appearance: none;
  background: #EEE !important;
  color: #000 !important;
}

/* Bookmark drag and drop styles */
.bookmark-item[dragover-into="true"] > .menu-iconic-text {
  background: #EEE !important;
  color: #000 !important;
}

/* rules for menupopup drop indicators */
.menupopup-drop-indicator-bar {
  position: relative;
  /* these two margins must together compensate the indicator's height */
  margin-top: -1px;
  margin-bottom: -1px;
}

.menupopup-drop-indicator {
  list-style-image: none;
  height: 2px;
  -moz-margin-end: -4em;
  background-color: #999;
}

/* ::::: Identity Indicator Styling ::::: */
/* Location bar visuals*/

#urlbar > .autocomplete-textbox-container {
  -moz-box-align: stretch;
}

#identity-box {
  -moz-appearance: none !important;
  overflow: -moz-hidden-unscrollable;
}

#identity-box > hbox {
  background: #FFF url("chrome://browser/skin/navbar-textbox-buttons.png") repeat-x;
  color: #000;
  border-left: 1px solid transparent;
  border-right: 1px solid #999;
  padding: 0px 2px 0px 2px;
}

#identity-box:hover > hbox {
  background-position: 0px -60px;
}

#identity-box.verifiedDomain > hbox {
  background-position: 0px -120px;
  color: white;
}

#identity-box.verifiedDomain:hover > hbox {
  background-position: 0px -180px;
}

#identity-box.verifiedIdentity > hbox {
  background-position: 0px -240px;
  color: white;
}

#identity-box.verifiedIdentity:hover > hbox {
  background-position: 0px -300px;
}

#identity-icon-label {
  padding: 0px 2px;
  margin: 0px;
}

#identity-icon-label[value=""] {
  display: none;
}

/* Popup Icons */
#identity-popup-icon {
  height: 64px;
  width: 64px;
  padding: 0px;
  list-style-image: url("chrome://browser/skin/identity.png");
  -moz-image-region: rect(0px, 64px, 64px, 0px);
}

#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
  -moz-image-region: rect(64px, 64px, 128px, 0px);
}

#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
  -moz-image-region: rect(128px, 64px, 192px, 0px);
}

/* Popup Body Text */
#identity-popup-content-box > description,
#identity-popup-encryption-label {
  white-space: pre-wrap;
  -moz-padding-start: 15px;
  margin: 2px 0px 4px;
}

#identity-popup-content-box > label {
  white-space: pre-wrap;
  -moz-padding-start: 15px;
  margin: 0px;
}
 
#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
  font-size: 1.2em;
}

#identity-popup-content-host {
  margin-top: 3px;
  margin-bottom: 5px;
  font-weight: bold;
  max-width: 300px;
}

#identity-popup-content-owner {
  margin-top: 4px;
  margin-bottom: 0px !important;
  font-weight: bold;
  max-width: 300px;
}

.verifiedDomain > #identity-popup-content-owner {
  font-weight: normal;
}

#identity-popup-content-verifier {
  margin: 4px 0px 2px;
}

#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
  margin-top: 10px;
  margin-left: -24px;
}

#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
  list-style-image: url("chrome://browser/skin/secure24.png");
}

#identity-popup-more-info-button {
  margin-top: 6px;
  -moz-margin-end: 1px;
}

/* Popup Bounding Box */
#identity-popup {
  -moz-appearance: none;
  background-color: #EEE;
  border: 1px solid #666;
  -moz-border-radius: 4px;
  color: #000;
  padding: 4px;
  margin-top: 2px;
}

#identity-popup-container {
  background-image: none;
  min-width: 280px;
  padding: 10px;
}

#download-monitor {
  list-style-image: url("chrome://browser/skin/download-monitor.png");
}

/* Bookmarks Toolbar menu-item */
#bookmarksToolbarFolderMenu {
  list-style-image: url("chrome://browser/skin/places/bookmarkstoolbar.png");
  -moz-image-region: auto;
}

/* If the nav toolbar is tall enough and an input box is the last item, add
   extra end spacing so that horizontal spacing matches vertical spacing. */
#nav-bar[mode="full"]:not([currentset]),
#nav-bar[mode="full"][currentset$=",urlbar-container"],
#nav-bar[mode="full"][currentset$=",search-container"],
#nav-bar[iconsize="large"][mode="icons"]:not([currentset]),
#nav-bar[iconsize="large"][mode="icons"][currentset$=",urlbar-container"],
#nav-bar[iconsize="large"][mode="icons"][currentset$=",search-container"] {
  -moz-padding-end: 2px;
}

/* ::::: Keyboard UI Panel ::::: */

.KUI-panel {
  -moz-appearance: none;
  background: rgba(27%,27%,27%,.9) url(KUI-background.png) repeat-x;
  color: white;
  border-style: none;
  -moz-border-radius: 20px;
}

.KUI-panel[level="top"] {
  background-color: rgba(27%,27%,27%,.65);
}

.KUI-panel-closebutton {
  list-style-image: url(KUI-close.png);
  -moz-appearance: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
}

.KUI-panel-closebutton:not(:hover) {
  opacity: .6;
}

.KUI-panel-closebutton > .toolbarbutton-icon {
  margin: 0;
}

/* ::::: Ctrl-Tab and All Tabs Panels ::::: */

.tabPreview-canvas {
  -moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
}

.ctrlTab-favicon[src],
.allTabs-favicon[src] {
  background-color: white;
  width: 24px;
  height: 24px;
  padding: 2px;
  opacity: .7;
}

/* Ctrl-Tab */

#ctrlTab-panel {
  padding: 20px 10px 10px;
  font-weight: bold;
  text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
}

.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
  margin-bottom: 2px;
}

.ctrlTab-preview .ctrlTab-preview-inner {
  padding-bottom: 10px;
}

#ctrlTab-showAll .ctrlTab-preview-inner {
  padding: 10px;
  background-color: rgba(255,255,255,.2);
  -moz-border-radius: .5em;
}

.ctrlTab-preview:focus .ctrlTab-preview-inner,
#ctrlTab-showAll:focus .ctrlTab-preview-inner {
  color: white;
  background-color: rgba(0,0,0,.6);
  text-shadow: none;
  padding: 8px;
  border: 2px solid white;
  -moz-border-radius: .5em;
}

.ctrlTab-preview:not(#ctrlTab-showAll):focus .ctrlTab-preview-inner {
  margin: -10px -10px 0;
}

#ctrlTab-showAll {
  margin-top: .5em;
}

/* All Tabs */

#allTabs-panel {
  padding: 10px;
  margin-left: -10px;
}

#allTabs-panel:not(.KUI-panel) {
  -moz-appearance: none;
  background: rgb(27%,27%,27%) url(KUI-background.png) repeat-x;
  border: none;
  color: white;
}

#allTabs-meta {
  margin-bottom: 10px;
}

#allTabs-filter {
  -moz-margin-start: 24px;
  -moz-margin-end: 0;
}

#allTabs-tab-close-button {
  /*XXX without this, the closebutton can cause the panel to expand horizontally */
  margin-right: -16px;
}

#allTabs-tab-close-button > .toolbarbutton-icon {
  margin: 0;
}

.allTabs-preview:focus,
.allTabs-preview:hover,
.allTabs-preview[closebuttonhover] {
  color: white;
  text-shadow: none;
  background-color: rgba(0,0,0,.4);
  -moz-border-radius: .5em;
}

.allTabs-preview:focus {
  border: 2px solid white;
}

.allTabs-preview-label {
  -moz-transform: translate(0, 1px);
}

/* ::::: Mac OS X extra dropmarker removal ::::: */

#back-button .toolbarbutton-menubutton-dropmarker,
#forward-button .toolbarbutton-menubutton-dropmarker {
   display: none !important;
}

#back-forward-dropmarker {
  padding: 0px;
}

/* ::::: Private browsing ::::: */
[browsingmode=private] #urlbar {
  -moz-appearance: none;
  color: #999;
}

[browsingmode=private] #page-proxy-favicon:not([src]),
[browsingmode=private] #page-proxy-favicon[pageproxystate="invalid"] {
  list-style-image: url("chrome://browser/skin/Privacy-16.png");
  -moz-image-region: auto;
}
